// actions
let nextTodoId = 0;
const addTodo = (text) => {
	return {
		type: "ADD_TODO",
		text: text,
		completed: false,
		id: nextTodoId++
	}
}
const toggleTodo = (id) => {
	return {
		type: "TOGGLE_TODO",
		id: id
	}
}

const setVisibilityFilter = (filter) => {
	return {
		type: "SET_VISIBILITY",
		filter: filter
	}
}

export {
	addTodo,
	toggleTodo,
	setVisibilityFilter
}